﻿//
// MainView.xaml.cs
//
// Authors:
//    Anders Gade Nørskov <09549@iha.dk
//    Lars Rønde Hansen <09548@iha.dk>
//    Claus Jørgensen <10229@iha.dk>
// 
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using GalaSoft.MvvmLight.Messaging;

namespace RSD.View
{
    using ViewModel;
    using ViewModel.Messages;

    /// <summary>
    /// Interaction logic for MainView.xaml
    /// </summary>
    public partial class MainView : Page
    {
        public MainView()
        {
            InitializeComponent();

            Messenger.Default.Register<OpenAboutViewMessage>(this,
                msg =>
                {
                    var aboutViewDlg = new AboutView();
                    aboutViewDlg.ShowDialog();
                });
        }

        private void ExitMenuItem_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }
    }
}
